/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "SMS_KEYWORD_SERVICE_MAPPING", catalog = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "SmsKeywordServiceMapping.findAll", query = "SELECT s FROM SmsKeywordServiceMapping s"),
    @NamedQuery(name = "SmsKeywordServiceMapping.findById", query = "SELECT s FROM SmsKeywordServiceMapping s WHERE s.id = :id"),
    @NamedQuery(name = "SmsKeywordServiceMapping.findByContentKeyword", query = "SELECT s FROM SmsKeywordServiceMapping s WHERE s.contentKeyword = :contentKeyword"),
    @NamedQuery(name = "SmsKeywordServiceMapping.findBySyntaxPrefix", query = "SELECT s FROM SmsKeywordServiceMapping s WHERE s.syntaxPrefix = :syntaxPrefix"),
    @NamedQuery(name = "SmsKeywordServiceMapping.findByServiceName", query = "SELECT s FROM SmsKeywordServiceMapping s WHERE s.serviceName = :serviceName"),
    @NamedQuery(name = "SmsKeywordServiceMapping.findByDescription", query = "SELECT s FROM SmsKeywordServiceMapping s WHERE s.description = :description")})
public class SmsKeywordServiceMapping implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private BigDecimal id;
    @Size(max = 200)
    @Column(name = "CONTENT_KEYWORD")
    private String contentKeyword;
    @Size(max = 20)
    @Column(name = "SYNTAX_PREFIX")
    private String syntaxPrefix;
    @Size(max = 20)
    @Column(name = "SERVICE_NAME")
    private String serviceName;
    @Size(max = 1000)
    @Column(name = "DESCRIPTION")
    private String description;

    public SmsKeywordServiceMapping() {
    }

    public SmsKeywordServiceMapping(BigDecimal id) {
        this.id = id;
    }

    public BigDecimal getId() {
        return id;
    }

    public void setId(BigDecimal id) {
        this.id = id;
    }

    public String getContentKeyword() {
        return contentKeyword;
    }

    public void setContentKeyword(String contentKeyword) {
        this.contentKeyword = contentKeyword;
    }

    public String getSyntaxPrefix() {
        return syntaxPrefix;
    }

    public void setSyntaxPrefix(String syntaxPrefix) {
        this.syntaxPrefix = syntaxPrefix;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SmsKeywordServiceMapping)) {
            return false;
        }
        SmsKeywordServiceMapping other = (SmsKeywordServiceMapping) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.SmsKeywordServiceMapping[ id=" + id + " ]";
    }
    
}
